//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension MigrationHubRefactorSpaces {
    // MARK: Enums

    public enum ApiGatewayEndpointType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `private` = "PRIVATE"
        case regional = "REGIONAL"
        public var description: String { return self.rawValue }
    }

    public enum ApplicationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EnvironmentState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case invalidResourceState = "INVALID_RESOURCE_STATE"
        case notAuthorized = "NOT_AUTHORIZED"
        case requestLimitExceeded = "REQUEST_LIMIT_EXCEEDED"
        case resourceCreationFailure = "RESOURCE_CREATION_FAILURE"
        case resourceDeletionFailure = "RESOURCE_DELETION_FAILURE"
        case resourceInUse = "RESOURCE_IN_USE"
        case resourceLimitExceeded = "RESOURCE_LIMIT_EXCEEDED"
        case resourceNotFound = "RESOURCE_NOT_FOUND"
        case resourceRetrievalFailure = "RESOURCE_RETRIEVAL_FAILURE"
        case resourceUpdateFailure = "RESOURCE_UPDATE_FAILURE"
        case serviceEndpointHealthCheckFailure = "SERVICE_ENDPOINT_HEALTH_CHECK_FAILURE"
        case stateTransitionFailure = "STATE_TRANSITION_FAILURE"
        public var description: String { return self.rawValue }
    }

    public enum ErrorResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case apiGateway = "API_GATEWAY"
        case application = "APPLICATION"
        case environment = "ENVIRONMENT"
        case iamRole = "IAM_ROLE"
        case lambda = "LAMBDA"
        case loadBalancerListener = "LOAD_BALANCER_LISTENER"
        case nlb = "NLB"
        case resourceShare = "RESOURCE_SHARE"
        case route = "ROUTE"
        case routeTable = "ROUTE_TABLE"
        case securityGroup = "SECURITY_GROUP"
        case service = "SERVICE"
        case subnet = "SUBNET"
        case targetGroup = "TARGET_GROUP"
        case transitGateway = "TRANSIT_GATEWAY"
        case transitGatewayAttachment = "TRANSIT_GATEWAY_ATTACHMENT"
        case vpc = "VPC"
        case vpcEndpointServiceConfiguration = "VPC_ENDPOINT_SERVICE_CONFIGURATION"
        case vpcLink = "VPC_LINK"
        public var description: String { return self.rawValue }
    }

    public enum HttpMethod: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case delete = "DELETE"
        case get = "GET"
        case head = "HEAD"
        case options = "OPTIONS"
        case patch = "PATCH"
        case post = "POST"
        case put = "PUT"
        public var description: String { return self.rawValue }
    }

    public enum NetworkFabricType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case none = "NONE"
        case transitGateway = "TRANSIT_GATEWAY"
        public var description: String { return self.rawValue }
    }

    public enum ProxyType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case apiGateway = "API_GATEWAY"
        public var description: String { return self.rawValue }
    }

    public enum RouteActivationState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum RouteState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case inactive = "INACTIVE"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum RouteType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `default` = "DEFAULT"
        case uriPath = "URI_PATH"
        public var description: String { return self.rawValue }
    }

    public enum ServiceEndpointType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case lambda = "LAMBDA"
        case url = "URL"
        public var description: String { return self.rawValue }
    }

    public enum ServiceState: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct ApiGatewayProxyConfig: AWSDecodableShape {
        /// The resource ID of the API Gateway for the proxy.
        public let apiGatewayId: String?
        /// The type of API Gateway endpoint created.
        public let endpointType: ApiGatewayEndpointType?
        /// The Amazon Resource Name (ARN) of the Network Load Balancer configured by the API Gateway proxy.
        public let nlbArn: String?
        /// The name of the Network Load Balancer that is configured by the API Gateway proxy.
        public let nlbName: String?
        /// The endpoint URL of the API Gateway proxy.
        public let proxyUrl: String?
        /// The name of the API Gateway stage. The name defaults to prod.
        public let stageName: String?
        /// The VpcLink ID of the API Gateway proxy.
        public let vpcLinkId: String?

        @inlinable
        public init(apiGatewayId: String? = nil, endpointType: ApiGatewayEndpointType? = nil, nlbArn: String? = nil, nlbName: String? = nil, proxyUrl: String? = nil, stageName: String? = nil, vpcLinkId: String? = nil) {
            self.apiGatewayId = apiGatewayId
            self.endpointType = endpointType
            self.nlbArn = nlbArn
            self.nlbName = nlbName
            self.proxyUrl = proxyUrl
            self.stageName = stageName
            self.vpcLinkId = vpcLinkId
        }

        private enum CodingKeys: String, CodingKey {
            case apiGatewayId = "ApiGatewayId"
            case endpointType = "EndpointType"
            case nlbArn = "NlbArn"
            case nlbName = "NlbName"
            case proxyUrl = "ProxyUrl"
            case stageName = "StageName"
            case vpcLinkId = "VpcLinkId"
        }
    }

    public struct ApiGatewayProxyInput: AWSEncodableShape & AWSDecodableShape {
        /// The type of endpoint to use for the API Gateway proxy. If no value is specified in the request, the value is set to REGIONAL by default. If the value is set to PRIVATE in the request, this creates a private API endpoint that is isolated from the public internet. The private endpoint can only be accessed by using Amazon Virtual Private Cloud (Amazon VPC) interface endpoints for the Amazon API Gateway that has been granted access. For more information about creating a private connection with Refactor Spaces and interface endpoint (Amazon Web Services PrivateLink) availability, see Access Refactor Spaces using an interface endpoint (Amazon Web Services PrivateLink).
        public let endpointType: ApiGatewayEndpointType?
        /// The name of the API Gateway stage. The name defaults to prod.
        public let stageName: String?

        @inlinable
        public init(endpointType: ApiGatewayEndpointType? = nil, stageName: String? = nil) {
            self.endpointType = endpointType
            self.stageName = stageName
        }

        public func validate(name: String) throws {
            try self.validate(self.stageName, name: "stageName", parent: name, max: 128)
            try self.validate(self.stageName, name: "stageName", parent: name, min: 1)
            try self.validate(self.stageName, name: "stageName", parent: name, pattern: "^[-a-zA-Z0-9_]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case endpointType = "EndpointType"
            case stageName = "StageName"
        }
    }

    public struct ApiGatewayProxySummary: AWSDecodableShape {
        /// The resource ID of the API Gateway for the proxy.
        public let apiGatewayId: String?
        /// The type of API Gateway endpoint created.
        public let endpointType: ApiGatewayEndpointType?
        /// The Amazon Resource Name (ARN) of the Network Load Balancer configured by the API Gateway proxy.
        public let nlbArn: String?
        /// The name of the Network Load Balancer that is configured by the API Gateway proxy.
        public let nlbName: String?
        /// The endpoint URL of the API Gateway proxy.
        public let proxyUrl: String?
        /// The name of the API Gateway stage. The name defaults to prod.
        public let stageName: String?
        /// The VpcLink ID of the API Gateway proxy.
        public let vpcLinkId: String?

        @inlinable
        public init(apiGatewayId: String? = nil, endpointType: ApiGatewayEndpointType? = nil, nlbArn: String? = nil, nlbName: String? = nil, proxyUrl: String? = nil, stageName: String? = nil, vpcLinkId: String? = nil) {
            self.apiGatewayId = apiGatewayId
            self.endpointType = endpointType
            self.nlbArn = nlbArn
            self.nlbName = nlbName
            self.proxyUrl = proxyUrl
            self.stageName = stageName
            self.vpcLinkId = vpcLinkId
        }

        private enum CodingKeys: String, CodingKey {
            case apiGatewayId = "ApiGatewayId"
            case endpointType = "EndpointType"
            case nlbArn = "NlbArn"
            case nlbName = "NlbName"
            case proxyUrl = "ProxyUrl"
            case stageName = "StageName"
            case vpcLinkId = "VpcLinkId"
        }
    }

    public struct ApplicationSummary: AWSDecodableShape {
        /// The endpoint URL of the Amazon API Gateway proxy.
        public let apiGatewayProxy: ApiGatewayProxySummary?
        /// The unique identifier of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the application.
        public let arn: String?
        /// The Amazon Web Services account ID of the application creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the application is created.
        public let createdTime: Date?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the application resource.
        public let error: ErrorResponse?
        /// A timestamp that indicates when the application was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the application.
        public let name: String?
        /// The Amazon Web Services account ID of the application owner (which is always the same as the environment owner account ID).
        public let ownerAccountId: String?
        /// The proxy type of the proxy created within the application.
        public let proxyType: ProxyType?
        /// The current state of the application.
        public let state: ApplicationState?
        /// The tags assigned to the application.
        public let tags: [String: String]?
        /// The ID of the virtual private cloud (VPC).
        public let vpcId: String?

        @inlinable
        public init(apiGatewayProxy: ApiGatewayProxySummary? = nil, applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ownerAccountId: String? = nil, proxyType: ProxyType? = nil, state: ApplicationState? = nil, tags: [String: String]? = nil, vpcId: String? = nil) {
            self.apiGatewayProxy = apiGatewayProxy
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.environmentId = environmentId
            self.error = error
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ownerAccountId = ownerAccountId
            self.proxyType = proxyType
            self.state = state
            self.tags = tags
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case apiGatewayProxy = "ApiGatewayProxy"
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case ownerAccountId = "OwnerAccountId"
            case proxyType = "ProxyType"
            case state = "State"
            case tags = "Tags"
            case vpcId = "VpcId"
        }
    }

    public struct ConflictException: AWSErrorShape {
        public let message: String
        /// The ID of the resource.
        public let resourceId: String
        /// The type of resource.
        public let resourceType: String

        @inlinable
        public init(message: String, resourceId: String, resourceType: String) {
            self.message = message
            self.resourceId = resourceId
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
        }
    }

    public struct CreateApplicationRequest: AWSEncodableShape {
        /// A wrapper object holding the API Gateway endpoint type and stage name for the proxy.
        public let apiGatewayProxy: ApiGatewayProxyInput?
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The unique identifier of the environment.
        public let environmentIdentifier: String
        /// The name to use for the application.
        public let name: String
        /// The proxy type of the proxy created within the application.
        public let proxyType: ProxyType
        /// The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?
        /// The ID of the virtual private cloud (VPC).
        public let vpcId: String

        @inlinable
        public init(apiGatewayProxy: ApiGatewayProxyInput? = nil, clientToken: String? = CreateApplicationRequest.idempotencyToken(), environmentIdentifier: String, name: String, proxyType: ProxyType, tags: [String: String]? = nil, vpcId: String) {
            self.apiGatewayProxy = apiGatewayProxy
            self.clientToken = clientToken
            self.environmentIdentifier = environmentIdentifier
            self.name = name
            self.proxyType = proxyType
            self.tags = tags
            self.vpcId = vpcId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.apiGatewayProxy, forKey: .apiGatewayProxy)
            try container.encodeIfPresent(self.clientToken, forKey: .clientToken)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            try container.encode(self.name, forKey: .name)
            try container.encode(self.proxyType, forKey: .proxyType)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encode(self.vpcId, forKey: .vpcId)
        }

        public func validate(name: String) throws {
            try self.apiGatewayProxy?.validate(name: "\(name).apiGatewayProxy")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[\\x20-\\x7E]{1,64}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.name, name: "name", parent: name, max: 63)
            try self.validate(self.name, name: "name", parent: name, min: 3)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!app-)[a-zA-Z0-9]+[a-zA-Z0-9-_ ]+$")
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.vpcId, name: "vpcId", parent: name, max: 21)
            try self.validate(self.vpcId, name: "vpcId", parent: name, min: 12)
            try self.validate(self.vpcId, name: "vpcId", parent: name, pattern: "^vpc-[-a-f0-9]{8}([-a-f0-9]{9})?$")
        }

        private enum CodingKeys: String, CodingKey {
            case apiGatewayProxy = "ApiGatewayProxy"
            case clientToken = "ClientToken"
            case name = "Name"
            case proxyType = "ProxyType"
            case tags = "Tags"
            case vpcId = "VpcId"
        }
    }

    public struct CreateApplicationResponse: AWSDecodableShape {
        /// A wrapper object holding the API Gateway endpoint type and stage name for the proxy.
        public let apiGatewayProxy: ApiGatewayProxyInput?
        /// The unique identifier of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is
        /// arn:aws:refactor-spaces:region:account-id:resource-type/resource-id . For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  Amazon Web Services General Reference.
        public let arn: String?
        /// The Amazon Web Services account ID of application creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the application is created.
        public let createdTime: Date?
        /// The ID of the environment in which the application is created.
        public let environmentId: String?
        /// A timestamp that indicates when the application was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the application.
        public let name: String?
        /// The Amazon Web Services account ID of the application owner (which is always the same as the environment owner account ID).
        public let ownerAccountId: String?
        /// The proxy type of the proxy created within the application.
        public let proxyType: ProxyType?
        /// The current state of the application.
        public let state: ApplicationState?
        /// The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?
        /// The ID of the Amazon VPC.
        public let vpcId: String?

        @inlinable
        public init(apiGatewayProxy: ApiGatewayProxyInput? = nil, applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, environmentId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ownerAccountId: String? = nil, proxyType: ProxyType? = nil, state: ApplicationState? = nil, tags: [String: String]? = nil, vpcId: String? = nil) {
            self.apiGatewayProxy = apiGatewayProxy
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.environmentId = environmentId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ownerAccountId = ownerAccountId
            self.proxyType = proxyType
            self.state = state
            self.tags = tags
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case apiGatewayProxy = "ApiGatewayProxy"
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case environmentId = "EnvironmentId"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case ownerAccountId = "OwnerAccountId"
            case proxyType = "ProxyType"
            case state = "State"
            case tags = "Tags"
            case vpcId = "VpcId"
        }
    }

    public struct CreateEnvironmentRequest: AWSEncodableShape {
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The description of the environment.
        public let description: String?
        /// The name of the environment.
        public let name: String
        /// The network fabric type of the environment.
        public let networkFabricType: NetworkFabricType
        /// The tags to assign to the environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?

        @inlinable
        public init(clientToken: String? = CreateEnvironmentRequest.idempotencyToken(), description: String? = nil, name: String, networkFabricType: NetworkFabricType, tags: [String: String]? = nil) {
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.networkFabricType = networkFabricType
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[\\x20-\\x7E]{1,64}$")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[a-zA-Z0-9-_\\s\\.\\!\\*\\#\\@\\']+$")
            try self.validate(self.name, name: "name", parent: name, max: 63)
            try self.validate(self.name, name: "name", parent: name, min: 3)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!env-)[a-zA-Z0-9]+[a-zA-Z0-9-_ ]+$")
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case name = "Name"
            case networkFabricType = "NetworkFabricType"
            case tags = "Tags"
        }
    }

    public struct CreateEnvironmentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the environment.
        public let arn: String?
        /// A timestamp that indicates when the environment is created.
        public let createdTime: Date?
        /// A description of the environment.
        public let description: String?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// A timestamp that indicates when the environment was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the environment.
        public let name: String?
        /// The network fabric type of the environment.
        public let networkFabricType: NetworkFabricType?
        /// The Amazon Web Services account ID of environment owner.
        public let ownerAccountId: String?
        /// The current state of the environment.
        public let state: EnvironmentState?
        /// The tags assigned to the created environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
        public let tags: [String: String]?

        @inlinable
        public init(arn: String? = nil, createdTime: Date? = nil, description: String? = nil, environmentId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, networkFabricType: NetworkFabricType? = nil, ownerAccountId: String? = nil, state: EnvironmentState? = nil, tags: [String: String]? = nil) {
            self.arn = arn
            self.createdTime = createdTime
            self.description = description
            self.environmentId = environmentId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.networkFabricType = networkFabricType
            self.ownerAccountId = ownerAccountId
            self.state = state
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdTime = "CreatedTime"
            case description = "Description"
            case environmentId = "EnvironmentId"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case networkFabricType = "NetworkFabricType"
            case ownerAccountId = "OwnerAccountId"
            case state = "State"
            case tags = "Tags"
        }
    }

    public struct CreateRouteRequest: AWSEncodableShape {
        /// The ID of the application within which the route is being created.
        public let applicationIdentifier: String
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        ///  Configuration for the default route type.
        public let defaultRoute: DefaultRouteInput?
        /// The ID of the environment in which the route is created.
        public let environmentIdentifier: String
        /// The route type of the route. DEFAULT indicates that all traffic that does not match another route is forwarded to the default route. Applications must have a default route before any other routes can be created. URI_PATH indicates a route that is based on a URI path.
        public let routeType: RouteType
        /// The ID of the service in which the route is created. Traffic that matches this route is forwarded to this service.
        public let serviceIdentifier: String
        /// The tags to assign to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
        public let tags: [String: String]?
        /// The configuration for the URI path route type.
        public let uriPathRoute: UriPathRouteInput?

        @inlinable
        public init(applicationIdentifier: String, clientToken: String? = CreateRouteRequest.idempotencyToken(), defaultRoute: DefaultRouteInput? = nil, environmentIdentifier: String, routeType: RouteType, serviceIdentifier: String, tags: [String: String]? = nil, uriPathRoute: UriPathRouteInput? = nil) {
            self.applicationIdentifier = applicationIdentifier
            self.clientToken = clientToken
            self.defaultRoute = defaultRoute
            self.environmentIdentifier = environmentIdentifier
            self.routeType = routeType
            self.serviceIdentifier = serviceIdentifier
            self.tags = tags
            self.uriPathRoute = uriPathRoute
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            try container.encodeIfPresent(self.clientToken, forKey: .clientToken)
            try container.encodeIfPresent(self.defaultRoute, forKey: .defaultRoute)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            try container.encode(self.routeType, forKey: .routeType)
            try container.encode(self.serviceIdentifier, forKey: .serviceIdentifier)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.uriPathRoute, forKey: .uriPathRoute)
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[\\x20-\\x7E]{1,64}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, max: 14)
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, min: 14)
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, pattern: "^svc-[0-9A-Za-z]{10}$")
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.uriPathRoute?.validate(name: "\(name).uriPathRoute")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case defaultRoute = "DefaultRoute"
            case routeType = "RouteType"
            case serviceIdentifier = "ServiceIdentifier"
            case tags = "Tags"
            case uriPathRoute = "UriPathRoute"
        }
    }

    public struct CreateRouteResponse: AWSDecodableShape {
        /// The ID of the application in which the route is created.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the route. The format for this ARN is
        /// arn:aws:refactor-spaces:region:account-id:resource-type/resource-id . For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  Amazon Web Services General Reference.
        public let arn: String?
        /// The Amazon Web Services account ID of the route creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the route is created.
        public let createdTime: Date?
        /// A timestamp that indicates when the route was last updated.
        public let lastUpdatedTime: Date?
        /// The Amazon Web Services account ID of the route owner.
        public let ownerAccountId: String?
        /// The unique identifier of the route.
        public let routeId: String?
        /// The route type of the route.
        public let routeType: RouteType?
        /// The ID of service in which the route is created. Traffic that matches this route is forwarded to this service.
        public let serviceId: String?
        /// The current state of the route. Activation state only allows ACTIVE or INACTIVE as user inputs. FAILED is a route state that is system generated.
        public let state: RouteState?
        /// The tags assigned to the created route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?
        /// Configuration for the URI path route type.
        public let uriPathRoute: UriPathRouteInput?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, lastUpdatedTime: Date? = nil, ownerAccountId: String? = nil, routeId: String? = nil, routeType: RouteType? = nil, serviceId: String? = nil, state: RouteState? = nil, tags: [String: String]? = nil, uriPathRoute: UriPathRouteInput? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.lastUpdatedTime = lastUpdatedTime
            self.ownerAccountId = ownerAccountId
            self.routeId = routeId
            self.routeType = routeType
            self.serviceId = serviceId
            self.state = state
            self.tags = tags
            self.uriPathRoute = uriPathRoute
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case lastUpdatedTime = "LastUpdatedTime"
            case ownerAccountId = "OwnerAccountId"
            case routeId = "RouteId"
            case routeType = "RouteType"
            case serviceId = "ServiceId"
            case state = "State"
            case tags = "Tags"
            case uriPathRoute = "UriPathRoute"
        }
    }

    public struct CreateServiceRequest: AWSEncodableShape {
        /// The ID of the application which the service is created.
        public let applicationIdentifier: String
        /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
        public let clientToken: String?
        /// The description of the service.
        public let description: String?
        /// The type of endpoint to use for the service. The type can be a URL in a VPC or an Lambda function.
        public let endpointType: ServiceEndpointType
        /// The ID of the environment in which the service is created.
        public let environmentIdentifier: String
        /// The configuration for the Lambda endpoint type.
        public let lambdaEndpoint: LambdaEndpointInput?
        /// The name of the service.
        public let name: String
        /// The tags to assign to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
        public let tags: [String: String]?
        /// The configuration for the URL endpoint type. When creating a route to a service, Refactor Spaces automatically resolves the address in the UrlEndpointInput object URL when the Domain Name System (DNS) time-to-live (TTL) expires, or every 60 seconds for TTLs less than 60 seconds.
        public let urlEndpoint: UrlEndpointInput?
        /// The ID of the VPC.
        public let vpcId: String?

        @inlinable
        public init(applicationIdentifier: String, clientToken: String? = CreateServiceRequest.idempotencyToken(), description: String? = nil, endpointType: ServiceEndpointType, environmentIdentifier: String, lambdaEndpoint: LambdaEndpointInput? = nil, name: String, tags: [String: String]? = nil, urlEndpoint: UrlEndpointInput? = nil, vpcId: String? = nil) {
            self.applicationIdentifier = applicationIdentifier
            self.clientToken = clientToken
            self.description = description
            self.endpointType = endpointType
            self.environmentIdentifier = environmentIdentifier
            self.lambdaEndpoint = lambdaEndpoint
            self.name = name
            self.tags = tags
            self.urlEndpoint = urlEndpoint
            self.vpcId = vpcId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            try container.encodeIfPresent(self.clientToken, forKey: .clientToken)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encode(self.endpointType, forKey: .endpointType)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            try container.encodeIfPresent(self.lambdaEndpoint, forKey: .lambdaEndpoint)
            try container.encode(self.name, forKey: .name)
            try container.encodeIfPresent(self.tags, forKey: .tags)
            try container.encodeIfPresent(self.urlEndpoint, forKey: .urlEndpoint)
            try container.encodeIfPresent(self.vpcId, forKey: .vpcId)
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 64)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[\\x20-\\x7E]{1,64}$")
            try self.validate(self.description, name: "description", parent: name, max: 256)
            try self.validate(self.description, name: "description", parent: name, min: 1)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[a-zA-Z0-9-_\\s\\.\\!\\*\\#\\@\\']+$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.lambdaEndpoint?.validate(name: "\(name).lambdaEndpoint")
            try self.validate(self.name, name: "name", parent: name, max: 63)
            try self.validate(self.name, name: "name", parent: name, min: 3)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!svc-)[a-zA-Z0-9]+[a-zA-Z0-9-_ ]+$")
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.urlEndpoint?.validate(name: "\(name).urlEndpoint")
            try self.validate(self.vpcId, name: "vpcId", parent: name, max: 21)
            try self.validate(self.vpcId, name: "vpcId", parent: name, min: 12)
            try self.validate(self.vpcId, name: "vpcId", parent: name, pattern: "^vpc-[-a-f0-9]{8}([-a-f0-9]{9})?$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken = "ClientToken"
            case description = "Description"
            case endpointType = "EndpointType"
            case lambdaEndpoint = "LambdaEndpoint"
            case name = "Name"
            case tags = "Tags"
            case urlEndpoint = "UrlEndpoint"
            case vpcId = "VpcId"
        }
    }

    public struct CreateServiceResponse: AWSDecodableShape {
        /// The ID of the application that the created service belongs to.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the service.
        public let arn: String?
        /// The Amazon Web Services account ID of the service creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the service is created.
        public let createdTime: Date?
        /// The description of the created service.
        public let description: String?
        /// The endpoint type of the service.
        public let endpointType: ServiceEndpointType?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// The configuration for the Lambda endpoint type.
        public let lambdaEndpoint: LambdaEndpointInput?
        /// A timestamp that indicates when the service was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the service.
        public let name: String?
        /// The Amazon Web Services account ID of the service owner.
        public let ownerAccountId: String?
        /// The unique identifier of the service.
        public let serviceId: String?
        /// The current state of the service.
        public let state: ServiceState?
        /// The tags assigned to the created service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
        public let tags: [String: String]?
        /// The configuration for the URL endpoint type.
        public let urlEndpoint: UrlEndpointInput?
        /// The ID of the VPC.
        public let vpcId: String?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, description: String? = nil, endpointType: ServiceEndpointType? = nil, environmentId: String? = nil, lambdaEndpoint: LambdaEndpointInput? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ownerAccountId: String? = nil, serviceId: String? = nil, state: ServiceState? = nil, tags: [String: String]? = nil, urlEndpoint: UrlEndpointInput? = nil, vpcId: String? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.description = description
            self.endpointType = endpointType
            self.environmentId = environmentId
            self.lambdaEndpoint = lambdaEndpoint
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ownerAccountId = ownerAccountId
            self.serviceId = serviceId
            self.state = state
            self.tags = tags
            self.urlEndpoint = urlEndpoint
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case description = "Description"
            case endpointType = "EndpointType"
            case environmentId = "EnvironmentId"
            case lambdaEndpoint = "LambdaEndpoint"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case ownerAccountId = "OwnerAccountId"
            case serviceId = "ServiceId"
            case state = "State"
            case tags = "Tags"
            case urlEndpoint = "UrlEndpoint"
            case vpcId = "VpcId"
        }
    }

    public struct DefaultRouteInput: AWSEncodableShape {
        /// If set to ACTIVE, traffic is forwarded to this route’s service after the route is created.
        public let activationState: RouteActivationState?

        @inlinable
        public init(activationState: RouteActivationState? = nil) {
            self.activationState = activationState
        }

        private enum CodingKeys: String, CodingKey {
            case activationState = "ActivationState"
        }
    }

    public struct DeleteApplicationRequest: AWSEncodableShape {
        /// The ID of the application.
        public let applicationIdentifier: String
        /// The ID of the environment.
        public let environmentIdentifier: String

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteApplicationResponse: AWSDecodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the application.
        public let arn: String?
        /// The unique identifier of the application’s environment.
        public let environmentId: String?
        /// A timestamp that indicates when the environment was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the application.
        public let name: String?
        /// The current state of the application.
        public let state: ApplicationState?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, environmentId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, state: ApplicationState? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.environmentId = environmentId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case environmentId = "EnvironmentId"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case state = "State"
        }
    }

    public struct DeleteEnvironmentRequest: AWSEncodableShape {
        /// The ID of the environment.
        public let environmentIdentifier: String

        @inlinable
        public init(environmentIdentifier: String) {
            self.environmentIdentifier = environmentIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteEnvironmentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the environment.
        public let arn: String?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// A timestamp that indicates when the environment was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the environment.
        public let name: String?
        /// The current state of the environment.
        public let state: EnvironmentState?

        @inlinable
        public init(arn: String? = nil, environmentId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, state: EnvironmentState? = nil) {
            self.arn = arn
            self.environmentId = environmentId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case environmentId = "EnvironmentId"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case state = "State"
        }
    }

    public struct DeleteResourcePolicyRequest: AWSEncodableShape {
        /// Amazon Resource Name (ARN) of the resource associated with the policy.
        public let identifier: String

        @inlinable
        public init(identifier: String) {
            self.identifier = identifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.identifier, key: "Identifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 2048)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 20)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "^arn:aws:refactor-spaces:[a-zA-Z0-9\\-]+:\\w{12}:[a-zA-Z_0-9+=,.@\\-_/]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteResourcePolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRouteRequest: AWSEncodableShape {
        /// The ID of the application to delete the route from.
        public let applicationIdentifier: String
        /// The ID of the environment to delete the route from.
        public let environmentIdentifier: String
        /// The ID of the route to delete.
        public let routeIdentifier: String

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String, routeIdentifier: String) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.routeIdentifier = routeIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodePath(self.routeIdentifier, key: "RouteIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, max: 14)
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, min: 14)
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, pattern: "^rte-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteRouteResponse: AWSDecodableShape {
        /// The ID of the application that the route belongs to.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the route.
        public let arn: String?
        /// A timestamp that indicates when the route was last updated.
        public let lastUpdatedTime: Date?
        /// The ID of the route to delete.
        public let routeId: String?
        /// The ID of the service that the route belongs to.
        public let serviceId: String?
        /// The current state of the route.
        public let state: RouteState?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, lastUpdatedTime: Date? = nil, routeId: String? = nil, serviceId: String? = nil, state: RouteState? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.lastUpdatedTime = lastUpdatedTime
            self.routeId = routeId
            self.serviceId = serviceId
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case lastUpdatedTime = "LastUpdatedTime"
            case routeId = "RouteId"
            case serviceId = "ServiceId"
            case state = "State"
        }
    }

    public struct DeleteServiceRequest: AWSEncodableShape {
        /// Deletes a Refactor Spaces service.  The RefactorSpacesSecurityGroup security group must be removed from all Amazon Web Services resources in the virtual private cloud (VPC) prior to deleting a service with a URL endpoint in a VPC.
        public let applicationIdentifier: String
        /// The ID of the environment that the service is in.
        public let environmentIdentifier: String
        /// The ID of the service to delete.
        public let serviceIdentifier: String

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String, serviceIdentifier: String) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.serviceIdentifier = serviceIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodePath(self.serviceIdentifier, key: "ServiceIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, max: 14)
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, min: 14)
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, pattern: "^svc-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteServiceResponse: AWSDecodableShape {
        /// The ID of the application that the service is in.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the service.
        public let arn: String?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// A timestamp that indicates when the service was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the service.
        public let name: String?
        /// The unique identifier of the service.
        public let serviceId: String?
        /// The current state of the service.
        public let state: ServiceState?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, environmentId: String? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, serviceId: String? = nil, state: ServiceState? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.environmentId = environmentId
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.serviceId = serviceId
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case environmentId = "EnvironmentId"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case serviceId = "ServiceId"
            case state = "State"
        }
    }

    public struct EnvironmentSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the environment.
        public let arn: String?
        /// A timestamp that indicates when the environment is created.
        public let createdTime: Date?
        /// A description of the environment.
        public let description: String?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the environment resource.
        public let error: ErrorResponse?
        /// A timestamp that indicates when the environment was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the environment.
        public let name: String?
        /// The network fabric type of the environment.
        public let networkFabricType: NetworkFabricType?
        /// The Amazon Web Services account ID of the environment owner.
        public let ownerAccountId: String?
        /// The current state of the environment.
        public let state: EnvironmentState?
        /// The tags assigned to the environment.
        public let tags: [String: String]?
        /// The ID of the Transit Gateway set up by the environment.
        public let transitGatewayId: String?

        @inlinable
        public init(arn: String? = nil, createdTime: Date? = nil, description: String? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, networkFabricType: NetworkFabricType? = nil, ownerAccountId: String? = nil, state: EnvironmentState? = nil, tags: [String: String]? = nil, transitGatewayId: String? = nil) {
            self.arn = arn
            self.createdTime = createdTime
            self.description = description
            self.environmentId = environmentId
            self.error = error
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.networkFabricType = networkFabricType
            self.ownerAccountId = ownerAccountId
            self.state = state
            self.tags = tags
            self.transitGatewayId = transitGatewayId
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdTime = "CreatedTime"
            case description = "Description"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case networkFabricType = "NetworkFabricType"
            case ownerAccountId = "OwnerAccountId"
            case state = "State"
            case tags = "Tags"
            case transitGatewayId = "TransitGatewayId"
        }
    }

    public struct EnvironmentVpc: AWSDecodableShape {
        /// The Amazon Web Services account ID of the virtual private cloud (VPC) owner.
        public let accountId: String?
        /// The list of Amazon Virtual Private Cloud (Amazon VPC) CIDR blocks.
        public let cidrBlocks: [String]?
        /// A timestamp that indicates when the VPC is first added to the environment.
        public let createdTime: Date?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// A timestamp that indicates when the VPC was last updated by the environment.
        public let lastUpdatedTime: Date?
        /// The ID of the VPC.
        public let vpcId: String?
        /// The name of the VPC at the time it is added to the environment.
        public let vpcName: String?

        @inlinable
        public init(accountId: String? = nil, cidrBlocks: [String]? = nil, createdTime: Date? = nil, environmentId: String? = nil, lastUpdatedTime: Date? = nil, vpcId: String? = nil, vpcName: String? = nil) {
            self.accountId = accountId
            self.cidrBlocks = cidrBlocks
            self.createdTime = createdTime
            self.environmentId = environmentId
            self.lastUpdatedTime = lastUpdatedTime
            self.vpcId = vpcId
            self.vpcName = vpcName
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case cidrBlocks = "CidrBlocks"
            case createdTime = "CreatedTime"
            case environmentId = "EnvironmentId"
            case lastUpdatedTime = "LastUpdatedTime"
            case vpcId = "VpcId"
            case vpcName = "VpcName"
        }
    }

    public struct ErrorResponse: AWSDecodableShape {
        /// The Amazon Web Services account ID of the resource owner.
        public let accountId: String?
        /// Additional details about the error.
        public let additionalDetails: [String: String]?
        /// The error code associated with the error.
        public let code: ErrorCode?
        /// The message associated with the error.
        public let message: String?
        /// The ID of the resource.
        public let resourceIdentifier: String?
        /// The type of resource.
        public let resourceType: ErrorResourceType?

        @inlinable
        public init(accountId: String? = nil, additionalDetails: [String: String]? = nil, code: ErrorCode? = nil, message: String? = nil, resourceIdentifier: String? = nil, resourceType: ErrorResourceType? = nil) {
            self.accountId = accountId
            self.additionalDetails = additionalDetails
            self.code = code
            self.message = message
            self.resourceIdentifier = resourceIdentifier
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case accountId = "AccountId"
            case additionalDetails = "AdditionalDetails"
            case code = "Code"
            case message = "Message"
            case resourceIdentifier = "ResourceIdentifier"
            case resourceType = "ResourceType"
        }
    }

    public struct GetApplicationRequest: AWSEncodableShape {
        /// The ID of the application.
        public let applicationIdentifier: String
        /// The ID of the environment.
        public let environmentIdentifier: String

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetApplicationResponse: AWSDecodableShape {
        /// The endpoint URL of the API Gateway proxy.
        public let apiGatewayProxy: ApiGatewayProxyConfig?
        /// The unique identifier of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the application.
        public let arn: String?
        /// The Amazon Web Services account ID of the application creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the application is created.
        public let createdTime: Date?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the application resource.
        public let error: ErrorResponse?
        /// A timestamp that indicates when the application was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the application.
        public let name: String?
        /// The Amazon Web Services account ID of the application owner (which is always the same as the environment owner account ID).
        public let ownerAccountId: String?
        /// The proxy type of the proxy created within the application.
        public let proxyType: ProxyType?
        /// The current state of the application.
        public let state: ApplicationState?
        /// The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?
        /// The ID of the virtual private cloud (VPC).
        public let vpcId: String?

        @inlinable
        public init(apiGatewayProxy: ApiGatewayProxyConfig? = nil, applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ownerAccountId: String? = nil, proxyType: ProxyType? = nil, state: ApplicationState? = nil, tags: [String: String]? = nil, vpcId: String? = nil) {
            self.apiGatewayProxy = apiGatewayProxy
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.environmentId = environmentId
            self.error = error
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ownerAccountId = ownerAccountId
            self.proxyType = proxyType
            self.state = state
            self.tags = tags
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case apiGatewayProxy = "ApiGatewayProxy"
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case ownerAccountId = "OwnerAccountId"
            case proxyType = "ProxyType"
            case state = "State"
            case tags = "Tags"
            case vpcId = "VpcId"
        }
    }

    public struct GetEnvironmentRequest: AWSEncodableShape {
        /// The ID of the environment.
        public let environmentIdentifier: String

        @inlinable
        public init(environmentIdentifier: String) {
            self.environmentIdentifier = environmentIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetEnvironmentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the environment.
        public let arn: String?
        /// A timestamp that indicates when the environment is created.
        public let createdTime: Date?
        /// The description of the environment.
        public let description: String?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the environment resource.
        public let error: ErrorResponse?
        /// A timestamp that indicates when the environment was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the environment.
        public let name: String?
        /// The network fabric type of the environment.
        public let networkFabricType: NetworkFabricType?
        /// The Amazon Web Services account ID of the environment owner.
        public let ownerAccountId: String?
        /// The current state of the environment.
        public let state: EnvironmentState?
        /// The tags to assign to the environment. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?
        /// The ID of the Transit Gateway set up by the environment, if applicable.
        public let transitGatewayId: String?

        @inlinable
        public init(arn: String? = nil, createdTime: Date? = nil, description: String? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, networkFabricType: NetworkFabricType? = nil, ownerAccountId: String? = nil, state: EnvironmentState? = nil, tags: [String: String]? = nil, transitGatewayId: String? = nil) {
            self.arn = arn
            self.createdTime = createdTime
            self.description = description
            self.environmentId = environmentId
            self.error = error
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.networkFabricType = networkFabricType
            self.ownerAccountId = ownerAccountId
            self.state = state
            self.tags = tags
            self.transitGatewayId = transitGatewayId
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
            case createdTime = "CreatedTime"
            case description = "Description"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case networkFabricType = "NetworkFabricType"
            case ownerAccountId = "OwnerAccountId"
            case state = "State"
            case tags = "Tags"
            case transitGatewayId = "TransitGatewayId"
        }
    }

    public struct GetResourcePolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource associated with the policy.
        public let identifier: String

        @inlinable
        public init(identifier: String) {
            self.identifier = identifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.identifier, key: "Identifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.identifier, name: "identifier", parent: name, max: 2048)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 20)
            try self.validate(self.identifier, name: "identifier", parent: name, pattern: "^arn:aws:refactor-spaces:[a-zA-Z0-9\\-]+:\\w{12}:[a-zA-Z_0-9+=,.@\\-_/]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetResourcePolicyResponse: AWSDecodableShape {
        /// A JSON-formatted string for an Amazon Web Services resource-based policy.
        public let policy: String?

        @inlinable
        public init(policy: String? = nil) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
        }
    }

    public struct GetRouteRequest: AWSEncodableShape {
        /// The ID of the application.
        public let applicationIdentifier: String
        /// The ID of the environment.
        public let environmentIdentifier: String
        /// The ID of the route.
        public let routeIdentifier: String

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String, routeIdentifier: String) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.routeIdentifier = routeIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodePath(self.routeIdentifier, key: "RouteIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, max: 14)
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, min: 14)
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, pattern: "^rte-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetRouteResponse: AWSDecodableShape {
        /// If set to true, this option appends the source path to the service URL endpoint.
        public let appendSourcePath: Bool?
        /// The ID of the application that the route belongs to.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the route.
        public let arn: String?
        /// The Amazon Web Services account ID of the route creator.
        public let createdByAccountId: String?
        /// The timestamp of when the route is created.
        public let createdTime: Date?
        /// Unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the route resource.
        public let error: ErrorResponse?
        /// Indicates whether to match all subpaths of the given source path. If this value is false, requests must match the source path exactly before they are forwarded to this route's service.
        public let includeChildPaths: Bool?
        /// A timestamp that indicates when the route was last updated.
        public let lastUpdatedTime: Date?
        /// A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.
        public let methods: [HttpMethod]?
        /// The Amazon Web Services account ID of the route owner.
        public let ownerAccountId: String?
        /// A mapping of Amazon API Gateway path resources to resource IDs.
        public let pathResourceToId: [String: String]?
        /// The unique identifier of the route.  DEFAULT: All traffic that does not match another route is forwarded to the default route. Applications must have a default route before any other routes can be created.  URI_PATH: A route that is based on a URI path.
        public let routeId: String?
        /// The type of route.
        public let routeType: RouteType?
        /// The unique identifier of the service.
        public let serviceId: String?
        /// This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to the base of the application. To use path parameters in the source path, add a variable in curly braces.  For example, the resource path {user} represents a path parameter called 'user'.
        public let sourcePath: String?
        /// The current state of the route.
        public let state: RouteState?
        /// The tags assigned to the route. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?

        @inlinable
        public init(appendSourcePath: Bool? = nil, applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, includeChildPaths: Bool? = nil, lastUpdatedTime: Date? = nil, methods: [HttpMethod]? = nil, ownerAccountId: String? = nil, pathResourceToId: [String: String]? = nil, routeId: String? = nil, routeType: RouteType? = nil, serviceId: String? = nil, sourcePath: String? = nil, state: RouteState? = nil, tags: [String: String]? = nil) {
            self.appendSourcePath = appendSourcePath
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.environmentId = environmentId
            self.error = error
            self.includeChildPaths = includeChildPaths
            self.lastUpdatedTime = lastUpdatedTime
            self.methods = methods
            self.ownerAccountId = ownerAccountId
            self.pathResourceToId = pathResourceToId
            self.routeId = routeId
            self.routeType = routeType
            self.serviceId = serviceId
            self.sourcePath = sourcePath
            self.state = state
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case appendSourcePath = "AppendSourcePath"
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case includeChildPaths = "IncludeChildPaths"
            case lastUpdatedTime = "LastUpdatedTime"
            case methods = "Methods"
            case ownerAccountId = "OwnerAccountId"
            case pathResourceToId = "PathResourceToId"
            case routeId = "RouteId"
            case routeType = "RouteType"
            case serviceId = "ServiceId"
            case sourcePath = "SourcePath"
            case state = "State"
            case tags = "Tags"
        }
    }

    public struct GetServiceRequest: AWSEncodableShape {
        /// The ID of the application.
        public let applicationIdentifier: String
        /// The ID of the environment.
        public let environmentIdentifier: String
        /// The ID of the service.
        public let serviceIdentifier: String

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String, serviceIdentifier: String) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.serviceIdentifier = serviceIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodePath(self.serviceIdentifier, key: "ServiceIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, max: 14)
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, min: 14)
            try self.validate(self.serviceIdentifier, name: "serviceIdentifier", parent: name, pattern: "^svc-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetServiceResponse: AWSDecodableShape {
        /// The ID of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the service.
        public let arn: String?
        /// The Amazon Web Services account ID of the service creator.
        public let createdByAccountId: String?
        /// The timestamp of when the service is created.
        public let createdTime: Date?
        /// The description of the service.
        public let description: String?
        /// The endpoint type of the service.
        public let endpointType: ServiceEndpointType?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the service resource.
        public let error: ErrorResponse?
        /// The configuration for the Lambda endpoint type. The Arn is the Amazon Resource Name (ARN) of the Lambda function associated with this service.
        public let lambdaEndpoint: LambdaEndpointConfig?
        /// A timestamp that indicates when the service was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the service.
        public let name: String?
        /// The Amazon Web Services account ID of the service owner.
        public let ownerAccountId: String?
        /// The unique identifier of the service.
        public let serviceId: String?
        /// The current state of the service.
        public let state: ServiceState?
        /// The tags assigned to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.
        public let tags: [String: String]?
        /// The configuration for the URL endpoint type. The Url isthe URL of the endpoint type. The HealthUrl is the health check URL of the endpoint type.
        public let urlEndpoint: UrlEndpointConfig?
        /// The ID of the virtual private cloud (VPC).
        public let vpcId: String?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, description: String? = nil, endpointType: ServiceEndpointType? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, lambdaEndpoint: LambdaEndpointConfig? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ownerAccountId: String? = nil, serviceId: String? = nil, state: ServiceState? = nil, tags: [String: String]? = nil, urlEndpoint: UrlEndpointConfig? = nil, vpcId: String? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.description = description
            self.endpointType = endpointType
            self.environmentId = environmentId
            self.error = error
            self.lambdaEndpoint = lambdaEndpoint
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ownerAccountId = ownerAccountId
            self.serviceId = serviceId
            self.state = state
            self.tags = tags
            self.urlEndpoint = urlEndpoint
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case description = "Description"
            case endpointType = "EndpointType"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case lambdaEndpoint = "LambdaEndpoint"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case ownerAccountId = "OwnerAccountId"
            case serviceId = "ServiceId"
            case state = "State"
            case tags = "Tags"
            case urlEndpoint = "UrlEndpoint"
            case vpcId = "VpcId"
        }
    }

    public struct LambdaEndpointConfig: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Lambda endpoint.
        public let arn: String?

        @inlinable
        public init(arn: String? = nil) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct LambdaEndpointInput: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Lambda function or alias.
        public let arn: String

        @inlinable
        public init(arn: String) {
            self.arn = arn
        }

        public func validate(name: String) throws {
            try self.validate(self.arn, name: "arn", parent: name, max: 2048)
            try self.validate(self.arn, name: "arn", parent: name, min: 1)
            try self.validate(self.arn, name: "arn", parent: name, pattern: "^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$")
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct LambdaEndpointSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Lambda endpoint.
        public let arn: String?

        @inlinable
        public init(arn: String? = nil) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct ListApplicationsRequest: AWSEncodableShape {
        /// The ID of the environment.
        public let environmentIdentifier: String
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(environmentIdentifier: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.environmentIdentifier = environmentIdentifier
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListApplicationsResponse: AWSDecodableShape {
        /// The list of ApplicationSummary objects.
        public let applicationSummaryList: [ApplicationSummary]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationSummaryList: [ApplicationSummary]? = nil, nextToken: String? = nil) {
            self.applicationSummaryList = applicationSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case applicationSummaryList = "ApplicationSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEnvironmentVpcsRequest: AWSEncodableShape {
        /// The ID of the environment.
        public let environmentIdentifier: String
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(environmentIdentifier: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.environmentIdentifier = environmentIdentifier
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListEnvironmentVpcsResponse: AWSDecodableShape {
        /// The list of EnvironmentVpc objects.
        public let environmentVpcList: [EnvironmentVpc]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(environmentVpcList: [EnvironmentVpc]? = nil, nextToken: String? = nil) {
            self.environmentVpcList = environmentVpcList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case environmentVpcList = "EnvironmentVpcList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEnvironmentsRequest: AWSEncodableShape {
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListEnvironmentsResponse: AWSDecodableShape {
        /// The list of EnvironmentSummary objects.
        public let environmentSummaryList: [EnvironmentSummary]?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(environmentSummaryList: [EnvironmentSummary]? = nil, nextToken: String? = nil) {
            self.environmentSummaryList = environmentSummaryList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case environmentSummaryList = "EnvironmentSummaryList"
            case nextToken = "NextToken"
        }
    }

    public struct ListRoutesRequest: AWSEncodableShape {
        /// The ID of the application.
        public let applicationIdentifier: String
        /// The ID of the environment.
        public let environmentIdentifier: String
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRoutesResponse: AWSDecodableShape {
        /// The token for the next page of results.
        public let nextToken: String?
        /// The list of RouteSummary objects.
        public let routeSummaryList: [RouteSummary]?

        @inlinable
        public init(nextToken: String? = nil, routeSummaryList: [RouteSummary]? = nil) {
            self.nextToken = nextToken
            self.routeSummaryList = routeSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case routeSummaryList = "RouteSummaryList"
        }
    }

    public struct ListServicesRequest: AWSEncodableShape {
        /// The ID of the application.
        public let applicationIdentifier: String
        /// The ID of the environment.
        public let environmentIdentifier: String
        /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
        public let maxResults: Int?
        /// The token for the next page of results.
        public let nextToken: String?

        @inlinable
        public init(applicationIdentifier: String, environmentIdentifier: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodeQuery(self.maxResults, key: "maxResults")
            request.encodeQuery(self.nextToken, key: "nextToken")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 2048)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^[a-zA-Z0-9/\\+\\=]{0,2048}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListServicesResponse: AWSDecodableShape {
        /// The token for the next page of results.
        public let nextToken: String?
        ///  The list of ServiceSummary objects.
        public let serviceSummaryList: [ServiceSummary]?

        @inlinable
        public init(nextToken: String? = nil, serviceSummaryList: [ServiceSummary]? = nil) {
            self.nextToken = nextToken
            self.serviceSummaryList = serviceSummaryList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case serviceSummaryList = "ServiceSummaryList"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The list of tags assigned to the resource.
        public let tags: [String: String]?

        @inlinable
        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct PutResourcePolicyRequest: AWSEncodableShape {
        /// A JSON-formatted string for an Amazon Web Services resource-based policy.
        public let policy: String
        /// The Amazon Resource Name (ARN) of the resource to which the policy is being attached.
        public let resourceArn: String

        @inlinable
        public init(policy: String, resourceArn: String) {
            self.policy = policy
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.policy, name: "policy", parent: name, max: 300000)
            try self.validate(self.policy, name: "policy", parent: name, min: 1)
            try self.validate(self.policy, name: "policy", parent: name, pattern: "^.*\\S.*$")
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 2048)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, min: 20)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:aws:refactor-spaces:[a-zA-Z0-9\\-]+:\\w{12}:[a-zA-Z_0-9+=,.@\\-_/]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case policy = "Policy"
            case resourceArn = "ResourceArn"
        }
    }

    public struct PutResourcePolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ResourceNotFoundException: AWSErrorShape {
        public let message: String
        /// The ID of the resource.
        public let resourceId: String
        /// The type of resource.
        public let resourceType: String

        @inlinable
        public init(message: String, resourceId: String, resourceType: String) {
            self.message = message
            self.resourceId = resourceId
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
        }
    }

    public struct RouteSummary: AWSDecodableShape {
        /// If set to true, this option appends the source path to the service URL endpoint.
        public let appendSourcePath: Bool?
        /// The unique identifier of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the route.
        public let arn: String?
        /// The Amazon Web Services account ID of the route creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the route is created.
        public let createdTime: Date?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the route resource.
        public let error: ErrorResponse?
        /// Indicates whether to match all subpaths of the given source path. If this value is false, requests must match the source path exactly before they are forwarded to this route's service.
        public let includeChildPaths: Bool?
        /// A timestamp that indicates when the route was last updated.
        public let lastUpdatedTime: Date?
        /// A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.
        public let methods: [HttpMethod]?
        /// The Amazon Web Services account ID of the route owner.
        public let ownerAccountId: String?
        /// A mapping of Amazon API Gateway path resources to resource IDs.
        public let pathResourceToId: [String: String]?
        /// The unique identifier of the route.
        public let routeId: String?
        /// The route type of the route.
        public let routeType: RouteType?
        /// The unique identifier of the service.
        public let serviceId: String?
        /// This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path {user} represents a path parameter called 'user'.
        public let sourcePath: String?
        /// The current state of the route.
        public let state: RouteState?
        /// The tags assigned to the route.
        public let tags: [String: String]?

        @inlinable
        public init(appendSourcePath: Bool? = nil, applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, includeChildPaths: Bool? = nil, lastUpdatedTime: Date? = nil, methods: [HttpMethod]? = nil, ownerAccountId: String? = nil, pathResourceToId: [String: String]? = nil, routeId: String? = nil, routeType: RouteType? = nil, serviceId: String? = nil, sourcePath: String? = nil, state: RouteState? = nil, tags: [String: String]? = nil) {
            self.appendSourcePath = appendSourcePath
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.environmentId = environmentId
            self.error = error
            self.includeChildPaths = includeChildPaths
            self.lastUpdatedTime = lastUpdatedTime
            self.methods = methods
            self.ownerAccountId = ownerAccountId
            self.pathResourceToId = pathResourceToId
            self.routeId = routeId
            self.routeType = routeType
            self.serviceId = serviceId
            self.sourcePath = sourcePath
            self.state = state
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case appendSourcePath = "AppendSourcePath"
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case includeChildPaths = "IncludeChildPaths"
            case lastUpdatedTime = "LastUpdatedTime"
            case methods = "Methods"
            case ownerAccountId = "OwnerAccountId"
            case pathResourceToId = "PathResourceToId"
            case routeId = "RouteId"
            case routeType = "RouteType"
            case serviceId = "ServiceId"
            case sourcePath = "SourcePath"
            case state = "State"
            case tags = "Tags"
        }
    }

    public struct ServiceQuotaExceededException: AWSErrorShape {
        public let message: String
        /// Service quota requirement to identify originating quota. Reached throttling quota exception.
        public let quotaCode: String?
        /// The ID of the resource.
        public let resourceId: String
        /// The type of resource.
        public let resourceType: String
        /// Service quota requirement to identify originating service. Reached throttling quota exception service code.
        public let serviceCode: String

        @inlinable
        public init(message: String, quotaCode: String? = nil, resourceId: String, resourceType: String, serviceCode: String) {
            self.message = message
            self.quotaCode = quotaCode
            self.resourceId = resourceId
            self.resourceType = resourceType
            self.serviceCode = serviceCode
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case quotaCode = "QuotaCode"
            case resourceId = "ResourceId"
            case resourceType = "ResourceType"
            case serviceCode = "ServiceCode"
        }
    }

    public struct ServiceSummary: AWSDecodableShape {
        /// The unique identifier of the application.
        public let applicationId: String?
        /// The Amazon Resource Name (ARN) of the service.
        public let arn: String?
        /// The Amazon Web Services account ID of the service creator.
        public let createdByAccountId: String?
        /// A timestamp that indicates when the service is created.
        public let createdTime: Date?
        /// A description of the service.
        public let description: String?
        /// The endpoint type of the service.
        public let endpointType: ServiceEndpointType?
        /// The unique identifier of the environment.
        public let environmentId: String?
        /// Any error associated with the service resource.
        public let error: ErrorResponse?
        /// A summary of the configuration for the Lambda endpoint type.
        public let lambdaEndpoint: LambdaEndpointSummary?
        /// A timestamp that indicates when the service was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the service.
        public let name: String?
        /// The Amazon Web Services account ID of the service owner.
        public let ownerAccountId: String?
        /// The unique identifier of the service.
        public let serviceId: String?
        /// The current state of the service.
        public let state: ServiceState?
        /// The tags assigned to the service.
        public let tags: [String: String]?
        /// The summary of the configuration for the URL endpoint type.
        public let urlEndpoint: UrlEndpointSummary?
        /// The ID of the virtual private cloud (VPC).
        public let vpcId: String?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, createdByAccountId: String? = nil, createdTime: Date? = nil, description: String? = nil, endpointType: ServiceEndpointType? = nil, environmentId: String? = nil, error: ErrorResponse? = nil, lambdaEndpoint: LambdaEndpointSummary? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, ownerAccountId: String? = nil, serviceId: String? = nil, state: ServiceState? = nil, tags: [String: String]? = nil, urlEndpoint: UrlEndpointSummary? = nil, vpcId: String? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.createdByAccountId = createdByAccountId
            self.createdTime = createdTime
            self.description = description
            self.endpointType = endpointType
            self.environmentId = environmentId
            self.error = error
            self.lambdaEndpoint = lambdaEndpoint
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.ownerAccountId = ownerAccountId
            self.serviceId = serviceId
            self.state = state
            self.tags = tags
            self.urlEndpoint = urlEndpoint
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case createdByAccountId = "CreatedByAccountId"
            case createdTime = "CreatedTime"
            case description = "Description"
            case endpointType = "EndpointType"
            case environmentId = "EnvironmentId"
            case error = "Error"
            case lambdaEndpoint = "LambdaEndpoint"
            case lastUpdatedTime = "LastUpdatedTime"
            case name = "Name"
            case ownerAccountId = "OwnerAccountId"
            case serviceId = "ServiceId"
            case state = "State"
            case tags = "Tags"
            case urlEndpoint = "UrlEndpoint"
            case vpcId = "VpcId"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The new or modified tags for the resource.
        public let tags: [String: String]

        @inlinable
        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
            try container.encode(self.tags, forKey: .tags)
        }

        public func validate(name: String) throws {
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ThrottlingException: AWSErrorShape {
        public let message: String
        /// Service quota requirement to identify originating quota. Reached throttling quota exception.
        public let quotaCode: String?
        /// The number of seconds to wait before retrying.
        public let retryAfterSeconds: Int?
        /// Service quota requirement to identify originating service. Reached throttling quota exception service code.
        public let serviceCode: String?

        @inlinable
        public init(message: String, quotaCode: String? = nil, retryAfterSeconds: Int? = nil, serviceCode: String? = nil) {
            self.message = message
            self.quotaCode = quotaCode
            self.retryAfterSeconds = retryAfterSeconds
            self.serviceCode = serviceCode
        }

        public init(from decoder: Decoder) throws {
            let response = decoder.userInfo[.awsResponse]! as! ResponseDecodingContainer
            let container = try decoder.container(keyedBy: CodingKeys.self)
            self.message = try container.decode(String.self, forKey: .message)
            self.quotaCode = try container.decodeIfPresent(String.self, forKey: .quotaCode)
            self.retryAfterSeconds = try response.decodeHeaderIfPresent(Int.self, key: "Retry-After")
            self.serviceCode = try container.decodeIfPresent(String.self, forKey: .serviceCode)
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case quotaCode = "QuotaCode"
            case serviceCode = "ServiceCode"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The list of keys of the tags to be removed from the resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.resourceArn, key: "ResourceArn")
            request.encodeQuery(self.tagKeys, key: "tagKeys")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateRouteRequest: AWSEncodableShape {
        ///  If set to ACTIVE, traffic is forwarded to this route’s service after the route is updated.
        public let activationState: RouteActivationState
        ///  The ID of the application within which the route is being updated.
        public let applicationIdentifier: String
        ///  The ID of the environment in which the route is being updated.
        public let environmentIdentifier: String
        ///  The unique identifier of the route to update.
        public let routeIdentifier: String

        @inlinable
        public init(activationState: RouteActivationState, applicationIdentifier: String, environmentIdentifier: String, routeIdentifier: String) {
            self.activationState = activationState
            self.applicationIdentifier = applicationIdentifier
            self.environmentIdentifier = environmentIdentifier
            self.routeIdentifier = routeIdentifier
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.activationState, forKey: .activationState)
            request.encodePath(self.applicationIdentifier, key: "ApplicationIdentifier")
            request.encodePath(self.environmentIdentifier, key: "EnvironmentIdentifier")
            request.encodePath(self.routeIdentifier, key: "RouteIdentifier")
        }

        public func validate(name: String) throws {
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, max: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, min: 14)
            try self.validate(self.applicationIdentifier, name: "applicationIdentifier", parent: name, pattern: "^app-[0-9A-Za-z]{10}$")
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, max: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, min: 14)
            try self.validate(self.environmentIdentifier, name: "environmentIdentifier", parent: name, pattern: "^env-[0-9A-Za-z]{10}$")
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, max: 14)
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, min: 14)
            try self.validate(self.routeIdentifier, name: "routeIdentifier", parent: name, pattern: "^rte-[0-9A-Za-z]{10}$")
        }

        private enum CodingKeys: String, CodingKey {
            case activationState = "ActivationState"
        }
    }

    public struct UpdateRouteResponse: AWSDecodableShape {
        ///  The ID of the application in which the route is being updated.
        public let applicationId: String?
        ///  The Amazon Resource Name (ARN) of the route. The format for this ARN is
        /// arn:aws:refactor-spaces:region:account-id:resource-type/resource-id . For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  Amazon Web Services General Reference.
        public let arn: String?
        ///  A timestamp that indicates when the route was last updated.
        public let lastUpdatedTime: Date?
        ///  The unique identifier of the route.
        public let routeId: String?
        ///  The ID of service in which the route was created. Traffic that matches this route is forwarded to this service.
        public let serviceId: String?
        ///  The current state of the route.
        public let state: RouteState?

        @inlinable
        public init(applicationId: String? = nil, arn: String? = nil, lastUpdatedTime: Date? = nil, routeId: String? = nil, serviceId: String? = nil, state: RouteState? = nil) {
            self.applicationId = applicationId
            self.arn = arn
            self.lastUpdatedTime = lastUpdatedTime
            self.routeId = routeId
            self.serviceId = serviceId
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case applicationId = "ApplicationId"
            case arn = "Arn"
            case lastUpdatedTime = "LastUpdatedTime"
            case routeId = "RouteId"
            case serviceId = "ServiceId"
            case state = "State"
        }
    }

    public struct UriPathRouteInput: AWSEncodableShape & AWSDecodableShape {
        /// If set to ACTIVE, traffic is forwarded to this route’s service after the route is created.
        public let activationState: RouteActivationState
        /// If set to true, this option appends the source path to the service URL endpoint.
        public let appendSourcePath: Bool?
        /// Indicates whether to match all subpaths of the given source path. If this value is false, requests must match the source path exactly before they are forwarded to this route's service.
        public let includeChildPaths: Bool?
        /// A list of HTTP methods to match. An empty list matches all values. If a method is present, only HTTP requests using that method are forwarded to this route’s service.
        public let methods: [HttpMethod]?
        /// This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path {user} represents a path parameter called 'user'.
        public let sourcePath: String

        @inlinable
        public init(activationState: RouteActivationState, appendSourcePath: Bool? = nil, includeChildPaths: Bool? = nil, methods: [HttpMethod]? = nil, sourcePath: String) {
            self.activationState = activationState
            self.appendSourcePath = appendSourcePath
            self.includeChildPaths = includeChildPaths
            self.methods = methods
            self.sourcePath = sourcePath
        }

        public func validate(name: String) throws {
            try self.validate(self.sourcePath, name: "sourcePath", parent: name, max: 2048)
            try self.validate(self.sourcePath, name: "sourcePath", parent: name, min: 1)
            try self.validate(self.sourcePath, name: "sourcePath", parent: name, pattern: "^(/([a-zA-Z0-9._:-]+|\\{[a-zA-Z0-9._:-]+\\}))+$")
        }

        private enum CodingKeys: String, CodingKey {
            case activationState = "ActivationState"
            case appendSourcePath = "AppendSourcePath"
            case includeChildPaths = "IncludeChildPaths"
            case methods = "Methods"
            case sourcePath = "SourcePath"
        }
    }

    public struct UrlEndpointConfig: AWSDecodableShape {
        /// The health check URL of the URL endpoint type.
        public let healthUrl: String?
        /// The HTTP URL endpoint.
        public let url: String?

        @inlinable
        public init(healthUrl: String? = nil, url: String? = nil) {
            self.healthUrl = healthUrl
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case healthUrl = "HealthUrl"
            case url = "Url"
        }
    }

    public struct UrlEndpointInput: AWSEncodableShape & AWSDecodableShape {
        /// The health check URL of the URL endpoint type. If the URL is a public endpoint, the HealthUrl must also be a public endpoint. If the URL is a private endpoint inside a virtual private cloud (VPC), the health URL must also be a private endpoint, and the host must be the same as the URL.
        public let healthUrl: String?
        /// The URL to route traffic to. The URL must be an rfc3986-formatted URL. If the host is a domain name, the name must be resolvable over the public internet. If the scheme is https, the top level domain of the host must be listed in the IANA root zone database.
        public let url: String

        @inlinable
        public init(healthUrl: String? = nil, url: String) {
            self.healthUrl = healthUrl
            self.url = url
        }

        public func validate(name: String) throws {
            try self.validate(self.healthUrl, name: "healthUrl", parent: name, max: 2048)
            try self.validate(self.healthUrl, name: "healthUrl", parent: name, min: 1)
            try self.validate(self.healthUrl, name: "healthUrl", parent: name, pattern: "^https?://[-a-zA-Z0-9+\\x38@#/%?=~_|!:,.;]*[-a-zA-Z0-9+\\x38@#/%=~_|]$")
            try self.validate(self.url, name: "url", parent: name, max: 2048)
            try self.validate(self.url, name: "url", parent: name, min: 1)
            try self.validate(self.url, name: "url", parent: name, pattern: "^https?://[-a-zA-Z0-9+\\x38@#/%?=~_|!:,.;]*[-a-zA-Z0-9+\\x38@#/%=~_|]$")
        }

        private enum CodingKeys: String, CodingKey {
            case healthUrl = "HealthUrl"
            case url = "Url"
        }
    }

    public struct UrlEndpointSummary: AWSDecodableShape {
        /// The health check URL of the URL endpoint type. If the URL is a public endpoint, the HealthUrl must also be a public endpoint. If the URL is a private endpoint inside a virtual private cloud (VPC), the health URL must also be a private endpoint, and the host must be the same as the URL.
        public let healthUrl: String?
        ///  The URL to route traffic to. The URL must be an rfc3986-formatted URL. If the host is a domain name, the name must be resolvable over the public internet. If the scheme is https, the top level domain of the host must be listed in the IANA root zone database.
        public let url: String?

        @inlinable
        public init(healthUrl: String? = nil, url: String? = nil) {
            self.healthUrl = healthUrl
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case healthUrl = "HealthUrl"
            case url = "Url"
        }
    }
}

// MARK: - Errors

/// Error enum for MigrationHubRefactorSpaces
public struct MigrationHubRefactorSpacesErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case invalidResourcePolicyException = "InvalidResourcePolicyException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize MigrationHubRefactorSpaces
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The user does not have sufficient access to perform this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// Updating or deleting a resource can cause an inconsistent state.
    public static var conflictException: Self { .init(.conflictException) }
    /// An unexpected error occurred while processing the request.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The resource policy is not valid.
    public static var invalidResourcePolicyException: Self { .init(.invalidResourcePolicyException) }
    /// The request references a resource that does not exist.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The request would cause a service quota to be exceeded.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// Request was denied because the request was throttled.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// The input does not satisfy the constraints specified by an Amazon Web Service.
    public static var validationException: Self { .init(.validationException) }
}

extension MigrationHubRefactorSpacesErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "ConflictException": MigrationHubRefactorSpaces.ConflictException.self,
        "ResourceNotFoundException": MigrationHubRefactorSpaces.ResourceNotFoundException.self,
        "ServiceQuotaExceededException": MigrationHubRefactorSpaces.ServiceQuotaExceededException.self,
        "ThrottlingException": MigrationHubRefactorSpaces.ThrottlingException.self
    ]
}

extension MigrationHubRefactorSpacesErrorType: Equatable {
    public static func == (lhs: MigrationHubRefactorSpacesErrorType, rhs: MigrationHubRefactorSpacesErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension MigrationHubRefactorSpacesErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
